{% extends 'base.html' %}

{% block title %}资产报废申请{% endblock %}

{% block content %}
<div class="container-fluid">
    <div class="row">
        <div class="col-12">
            <div class="d-flex justify-content-between align-items-center mb-4">
                <h2><i class="fas fa-trash-alt me-2"></i>资产报废申请</h2>
                <a href="{% url 'assets:asset_detail' asset.id %}" class="btn btn-secondary">
                    <i class="fas fa-arrow-left me-1"></i>返回资产详情
                </a>
            </div>

            <div class="card">
                <div class="card-header">
                    <h5 class="mb-0">资产信息</h5>
                </div>
                <div class="card-body">
                    <p><strong>资产名称:</strong> {{ asset.name }}</p>
                    <p><strong>资产编号:</strong> {{ asset.asset_number }}</p>
                    <p><strong>当前状态:</strong> {{ asset.get_status_display }}</p>
                </div>
            </div>

            <div class="card mt-4">
                <div class="card-header">
                    <h5 class="mb-0">报废申请</h5>
                </div>
                <div class="card-body">
                    <form method="post">
                        {% csrf_token %}
                        <div class="mb-3">
                            <label for="id_reason" class="form-label">报废事由</label>
                            {{ form.reason }}
                        </div>
                        <button type="submit" class="btn btn-danger">提交报废申请</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
